# -*- coding: utf-8 -*-
# @Time : 2019/1/11 0011 14:48
# @Author : 犯傻中
# @File : supervise.py
# @Project : Python
# @title :
import requests,unittest,HTMLTestRunner

class student_manage(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.ses=requests.session()
        c = cls.ses.post(url='http://192.168.2.155:8080/WoniuBoss2.5/log/userLogin',data={'userName':'wncd005','userPass':'woniu123','checkcode':'0000'})
        # print('-----')
        # print(c.cookies)
        # print('-----')
    @classmethod
    def tearDownClass(cls):
        print("")
    # def test_Stagevaluation(self):
    #     url='http://192.168.2.155:8080/WoniuBoss2.5/student/saveScore'
    #     data={"pe.phase_exam_student_id":"843","pe_orientation1":"","pe_class1":"","pe.phase":"%E4%B8%93%E4%B8%9A%E7%AC%AC%E4%B8%80%E9%98%B6%E6%AE%B5","pe.score":"8889","status":"1","pe.comment":"haha"}
    #     c=self.ses.post(url=url,data=data)
    #     print(c.text)


    def test_demotion(self):
        url ='http://192.168.2.155:8080/WoniuBoss2.5/student/updateRepeat'
        data={"pe.phase_exam_student_id":"843","old_re_orientation":"%E5%BC%80%E5%8F%91","old_re_class":"WNCQC006","orientation":"%E6%B5%8B%E8%AF%95","class_no":"WNCDC035"}
        c=self.ses.post(url=url,data=data)
        print(c.text)


    def test_driveintoclass(self):
        url='http://192.168.2.155:8080/WoniuBoss2.5/student/allocate'
        data={""}
        

if __name__ == '__main__':
    unittest.main()







#def test_add(self):
   #     session = requests.Session()
   #     res = session.post('http://192.168.2.176:8080/woniuboss2.5/log/userLogin', data={
   #         'userName': 'WNCD051',
   #         'userPass': 'woniu123',
   #         'checkcode': '0000'
   #     })
   #     re = session.post(url='http://192.168.2.176:8080/woniuboss2.5/student/saveLeave', data=
   #     {"sl.student_id":"1275","sl.start_time": "2019-01-10","sl.end_time": "2019-01-11",
   #      "sl.leave_type":"%E7%97%85%E5%81%87","sl.days": "1","stuName":"%E5%86%B7%E4%BD%A9",
   #      "sl.reason": "1", "sl.comment": "1"})
   #     if 'success' == re.text:
   #         print('ok')
   #     else:
   #         print('not ok')





